<template>
  <div>加载中。。。</div>
</template>

<script>
import { mapActions } from 'vuex'
export default {
  data () {
    return {
      username: 'test1',
      password: 'flfjaj2021'
    }
  },
  methods: {
    ...mapActions(['Logins'])
  },
  created () {
    const query = this.$route.query
    // 执行默认登录操作
    var CryptoJS = require('crypto-js')
    var key = CryptoJS.enc.Utf8.parse('abcdefghijklmn12')
		var iv = CryptoJS.enc.Utf8.parse('abcdefghijklmn12')
		var encrypted = CryptoJS.AES.encrypt('flfjaj2021', key, {
			iv,
			mode: CryptoJS.mode.CBC,
			padding: CryptoJS.pad.Pkcs7
		})
    this.Logins({
      username: 'test1',
      password: encrypted.toString(),
      id: query.id
    }).then(() => {
      this.$router.push({ path: '/' })
    })
  }
}
</script>

<style>

</style>
